Field of the Invention
The present invention relates to a storage medium, an information processing apparatus, a control method, and particularly to a technique for controlling a viewpoint parameter that becomes a reference for rendering of a 3D scene.
Description of the Related Art
In recent years, techniques that render a three-dimensional (3D) scene as computer graphics (CG) have been used in various fields, and these are not limited to the field of computerized games. In these CG, rendering objects are located in a 3D scene by reflecting parameters such as predetermined positions or orientations, and are generated by rendering the scene for a particular viewpoint.
Incidentally, there is game content in which a desired viewpoint position is selectably configured in accordance with manipulation by a player. In such content, a gaze point is set such that a character, which is a manipulation target for example, is captured in an angle of view, and a player can perform game play by screens rendered in accordance with a viewpoint position that is changed so as to move in an outer circumference of the character. However, there are cases in which depending on the changed viewpoint position there is an object that occludes a gaze point, and there is the possibility that a screen that is not suitable for a player is presented. Japanese Patent Laid-Open No. H07-085312 discloses a technique that changes to a viewpoint position with which it is possible to capture a subject if a straight line that connects a reference point (a gaze point), which is determined so that it is easy to refer to the subject which is designated so as to be captured in an angle of view, and a viewpoint is obstructed by an obstacle.
However, because the technique recited in Japanese Patent Laid-Open No. H07-085312 does not move the viewpoint if the straight line that connects the gaze point and the viewpoint is not obstructed by an obstacle, there is a case such as the following in which a screen not suitable for a player is presented.
For example, if there is a background (BG) object at a position close to a viewpoint as illustrated in FIG. 9(a), because the straight line that connects the gaze point and the viewpoint is not obstructed, a change of the viewpoint is not performed by the technique recited in Japanese Patent Laid-Open No. H07-085312 in a screen rendered for such a viewpoint, but this results in a screen in which a large region of the screen is occupied by a BG object as illustrated by FIG. 9(b) is output. In other words, such a screen is not something configured such that a player can grasp the state of the rightward direction of the screen, and there is the possibility of giving the player with an impression that the screen is not such that game play can be performed suitably.
In addition, in a case in which there is a relation between a viewpoint and a BG object such as in FIG. 9(a), there is the possibility that due to a portion of vertices not being included in an angle of view due to a configuration of model data of the BG object, a screen of a broken rendering expression such as one in which a plane configured to include these vertices is not rendered and the inside of the BG object appears as transparent, will be presented.
Meanwhile, even in a case of moving a viewpoint if a straight line connecting the viewpoint and a gaze point is obstructed by an obstacle as in Japanese Patent Laid-Open No. H07-085312, in game content in which a character object that is not a target of manipulation by a player is located in a vicinity of a manipulation target character object, such as in a so-called three-dimensional action game in particular, there are cases in which a screen that is not suitable for a player is presented.
By the technique recited in Japanese Patent Laid-open No. H07-085312, for example if a character object present behind a manipulation target character object is determined to be an obstacle, a viewpoint position is changed to a position at which occlusion by the character object does not occur. However, in game content such as a three-dimensional action game, a viewpoint change to a position such that it becomes impossible to see a battle opponent character object that is located in the vicinity of a manipulation target character object has the possibility of resulting in an obstruction to game play.